﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;

namespace Polymorphism
{
    abstract class ServerBase
    {
        public abstract void ExecuteQuery(string query);
    }

    class SqlServer : ServerBase
    {
        public override void ExecuteQuery(string query)
        {

        }
    }

    class OracleServer : ServerBase
    {
        public override void ExecuteQuery(string query)
        {

        }
    }

  //  public class ServerCreator
  //  {
  //      public ServerBase CreateServer(string address)
   //     {
   //         if (address.StartsWith("sql"))
   //             return new SqlServer();
    //        return new OracleServer();
    //   }
  //  }
   
}
